﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>上传文件、下载文件</title>
    <script type="text/javascript">

        function DownloadFile() {
            var fileId = document.getElementById("fileId").value;
            window.open("/api/DownloadFile/" + fileId, "_blank");
        }

    </script>
</head>
<body>
    <h1>上传文件</h1>
    <div class="row">
        <section>
            <form method="post" enctype="multipart/form-data" action="/api/UploadFile/File">
                <div>
                    <p>一个或多个文件上传</p>
                    <input type="file" name="files" multiple />
                    <input type="submit" value="上传" />
                </div>
            </form>
        </section>
    </div>
    <h1>下载文件</h1>
    <div>
        <section>
            <input id="fileId" style="width: 270px;" />
            <input type="button" onclick="DownloadFile()" value="下载" />
        </section>
    </div>
</body>
</html>